package cn.MaySoon.zhuansheng;

import cn.MaySoon.zhuansheng.handle;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;

public class listen implements Listener {
        @EventHandler
        public void onPlayerJoin(PlayerJoinEvent e){
            Player p = e.getPlayer();
        handle.downloadPlayerData(p);
        AP.updatePlayerAttribute(p);
        }


        @EventHandler
        public void onPlayerQuit(PlayerQuitEvent e){
                Player p =e.getPlayer();
                if (main.PlayerZhaunSheng.containsKey(p)){
                        main.PlayerZhaunSheng.remove(p);
                }
                if (main.PlayerAttribute.containsKey(p)){
                        main.PlayerAttribute.remove(p);
                }
        }







}
